#include <vector>
#include <memory>
#include <sys/types.h>
#include <sys/socket.h>
#include <arpa/inet.h>
#include <thread>
#include <cstdio>
#include <sys/epoll.h>
#include <string.h>
#include <unistd.h>
#include <cstring>
#include <sys/stat.h>
#include <errno.h>
#include "Request.hpp"
#include "Response.hpp"
#include "HTTP.hpp"
#include "../../_debug/include/debug_setting.h"
#include "httpRequest.hpp"

struct Impl_Server;


class Server{
public:
    Server(int port=8000,int listen_num=1024);
    int run();
    const int get_server_fd() const;
    int get_server_fd();
    int get_epfd();
    // void Server_accept(void); // listen connect.
    int request();
    ~Server();
private:
    std::shared_ptr<Impl_Server> pimpl;
    // int server_fd;
    // int epfd;  // Server's epoll's filefd.
    // int listen_num;  // Decide listen's size and epoll's event size.
    // struct sockaddr_in server_addr;
    // unsigned int PORT;
    // struct epoll_event *events;  // this is epool's events. it's size look listen_nums.

};
